package cn.kmia.hrm.pojo.system;

import cn.kmia.hrm.pojo.BasePojo;
import org.nutz.dao.entity.annotation.*;

import java.io.Serializable;

/**
 * @项目：hrm
 * @作者：4K
 * @描述：用户角色
 * @日期：created in 10:47 2017/4/5
 */
@Table("sys_user_role")
@PK({"roleId", "userId"})
public class UserRole extends BasePojo implements Serializable {

    /**
     * 角色id
     */
    @Column("role_id")
    @Comment("角色id")
    @ColDefine(type = ColType.INT)
    private int roleId;

    /**
     * 用户id
     */
    @Column("user_id")
    @Comment("用户id")
    @ColDefine(type = ColType.INT)
    private int userId;

    public UserRole() {
    }

    public UserRole(int userId, int roleId) {
        this.userId = userId;
        this.roleId = roleId;
    }

    public int getRoleId() {
        return roleId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }
}
